package JHfstools;

import JHfstools.hftmain.dlgdata;

import java.awt.EventQueue;

import javax.swing.JDialog;
import javax.swing.SpringLayout;
import javax.swing.JPanel;

import java.awt.Color;

import javax.swing.border.TitledBorder;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.JComboBox;
import javax.swing.JRadioButton;

import java.awt.Font;
import java.io.File;

import javax.swing.ButtonGroup;
import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JFileChooser;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTextField;
import javax.swing.JPasswordField;
import javax.swing.JCheckBox;
import javax.swing.JScrollPane;
import javax.swing.JTree;
import javax.swing.JButton;
import javax.swing.ImageIcon;
import javax.swing.MutableComboBoxModel;

import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.Dimension;
import java.awt.event.ItemListener;
import java.awt.event.ItemEvent;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;

import javax.swing.UIManager;

public class hftsecdlg extends JDialog {
	/**
	 * 
	 */
	private final ButtonGroup buttonGroup = new ButtonGroup();
	private JTextField hftsecuid;
	private JPasswordField hftsecpswd;
	DefaultMutableTreeNode root;
	private final ButtonGroup buttonGroup_1 = new ButtonGroup();
	private JComboBox hftsectargbox;
	private JCheckBox hftsecsaveuid;
	private JCheckBox hftsavepwd;
	private static String[] tsys = new String[50];
	private int jcti = 0;
	private String tlbname = null;
	boolean sf = false; // string found for target system combo box array
	boolean ep = false; // enter pressed in target system combo box
	private static JComboBox hftksbox;
	private static JRadioButton hftftpbtn;
	private static JRadioButton hftsftpbtn;
	private JRadioButton hftftpsbtn;
	private JRadioButton hftscpbtn;
	private JRadioButton hftshellbtn;
	private final ButtonGroup buttonGroup_2 = new ButtonGroup();

	/**
	 * Launch the application.
	 */
	public static String[] main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					hftsecdlg dialog = new hftsecdlg(null);
					dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
					dialog.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
		return tsys;
	}

	/**
	 * Create the dialog.
	 * @param d 
	 */
	public hftsecdlg(String[] t) {
		setModal(true);
		setMinimumSize(new Dimension(600, 496));
		getContentPane().setFont(new Font("Verdana", Font.PLAIN, 11));
		getContentPane().setBackground(new Color(245, 255, 250));
		setTitle("JHFStools Security Settings");
		setBounds(100, 100, 600, 496);
		SpringLayout springLayout = new SpringLayout();
		getContentPane().setLayout(springLayout);

		
		JPanel panel = new JPanel();
		springLayout.putConstraint(SpringLayout.NORTH, panel, 10, SpringLayout.NORTH, getContentPane());
		springLayout.putConstraint(SpringLayout.WEST, panel, 10, SpringLayout.WEST, getContentPane());
		springLayout.putConstraint(SpringLayout.SOUTH, panel, 73, SpringLayout.NORTH, getContentPane());
		springLayout.putConstraint(SpringLayout.EAST, panel, 173, SpringLayout.WEST, getContentPane());
		panel.setBorder(new TitledBorder(null, "Target System", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		getContentPane().add(panel);
		SpringLayout sl_panel = new SpringLayout();
		panel.setLayout(sl_panel);
		
		hftsectargbox = new JComboBox();

		hftsectargbox.setEditable(true);
		sl_panel.putConstraint(SpringLayout.NORTH, hftsectargbox, 10, SpringLayout.NORTH, panel);
		sl_panel.putConstraint(SpringLayout.WEST, hftsectargbox, 10, SpringLayout.WEST, panel);
		sl_panel.putConstraint(SpringLayout.SOUTH, hftsectargbox, -2, SpringLayout.SOUTH, panel);
		sl_panel.putConstraint(SpringLayout.EAST, hftsectargbox, 137, SpringLayout.WEST, panel);
		panel.add(hftsectargbox);
    	tsys = hftmain.d.gettargst();
		final MutableComboBoxModel jTargboxModel = 
				new DefaultComboBoxModel(tsys);
		hftsectargbox.setModel(jTargboxModel);
		try{
			if (hftmain.d.gettarg() != null){
				String test = hftmain.d.gettarg();
				hftsectargbox.setSelectedItem(test);
			}
		}catch(NullPointerException e ){
	
		}
		hftsectargbox.setSelectedIndex(0);
		hftsectargbox.getEditor().getEditorComponent().addKeyListener(new KeyAdapter() 
	    {
	        public void keyPressed(KeyEvent evt)
	        {
	            if(evt.getKeyCode() == KeyEvent.VK_ENTER)
	            {

	            	tlbname = (String) hftsectargbox.getEditor().getItem();
					if (tsys[jcti] != null){ // There are name in array so loop through and make sure not a dup.
					for (; jcti<50; jcti++){
					try{	
					if (tsys[jcti].isEmpty()){break;}
					}catch(NullPointerException n){
						break;
					}// end catch
					if (tsys[jcti].toString() == tlbname){sf = true; break;}	
					}// end for loop
					if (sf == false){tsys[jcti] = tlbname; sf = true; jcti++; ep = true;}
 	            }// end if tsys[jsti] != null
					if (tsys[jcti] == null & sf == false){sf = true; tsys[jcti]=tlbname; jcti++; ep = true;} // If no names in array, just add one.
	            }// end if KeyCode == VK_ENTER
	        }// end of keyPressed event 
	    }// end addKeyListener block
		);
		
		JPanel panel_1 = new JPanel();
		panel_1.setBorder(new TitledBorder(null, "Connect using", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		springLayout.putConstraint(SpringLayout.NORTH, panel_1, 10, SpringLayout.NORTH, getContentPane());
		springLayout.putConstraint(SpringLayout.WEST, panel_1, 6, SpringLayout.EAST, panel);
		springLayout.putConstraint(SpringLayout.SOUTH, panel_1, 73, SpringLayout.NORTH, getContentPane());
		springLayout.putConstraint(SpringLayout.EAST, panel_1, 409, SpringLayout.EAST, panel);
		getContentPane().add(panel_1);
		SpringLayout sl_panel_1 = new SpringLayout();
		panel_1.setLayout(sl_panel_1);
		
		JRadioButton hftsecuid_1 = new JRadioButton("Userid & Password");
		hftsecuid_1.setSelected(true);
		buttonGroup.add(hftsecuid_1);
		hftsecuid_1.setFont(new Font("Verdana", Font.PLAIN, 11));
		sl_panel_1.putConstraint(SpringLayout.WEST, hftsecuid_1, 0, SpringLayout.WEST, panel_1);
		sl_panel_1.putConstraint(SpringLayout.SOUTH, hftsecuid_1, 0, SpringLayout.SOUTH, panel_1);
		panel_1.add(hftsecuid_1);
		
		JRadioButton hftsecpki = new JRadioButton("PKI Key");
		buttonGroup.add(hftsecpki);
		hftsecpki.setFont(new Font("Verdana", Font.PLAIN, 11));
		sl_panel_1.putConstraint(SpringLayout.NORTH, hftsecpki, 0, SpringLayout.NORTH, hftsecuid_1);
		sl_panel_1.putConstraint(SpringLayout.WEST, hftsecpki, 12, SpringLayout.EAST, hftsecuid_1);
		panel_1.add(hftsecpki);
		
		JRadioButton hftseccert = new JRadioButton("Digital Certificate");
		sl_panel_1.putConstraint(SpringLayout.EAST, hftseccert, 151, SpringLayout.EAST, hftsecpki);
		buttonGroup.add(hftseccert);
		hftseccert.setFont(new Font("Verdana", Font.PLAIN, 11));
		sl_panel_1.putConstraint(SpringLayout.NORTH, hftseccert, 0, SpringLayout.NORTH, hftsecuid_1);
		sl_panel_1.putConstraint(SpringLayout.WEST, hftseccert, 9, SpringLayout.EAST, hftsecpki);
		panel_1.add(hftseccert);
		
		JPanel panel_2 = new JPanel();
		springLayout.putConstraint(SpringLayout.WEST, panel_2, 0, SpringLayout.WEST, panel);
		springLayout.putConstraint(SpringLayout.EAST, panel_2, 272, SpringLayout.WEST, getContentPane());
		getContentPane().add(panel_2);
		SpringLayout sl_panel_2 = new SpringLayout();
		panel_2.setLayout(sl_panel_2);
		
		JLabel lblUserid = new JLabel("Userid:");
		lblUserid.setFont(new Font("Verdana", Font.PLAIN, 11));
		sl_panel_2.putConstraint(SpringLayout.NORTH, lblUserid, 10, SpringLayout.NORTH, panel_2);
		sl_panel_2.putConstraint(SpringLayout.WEST, lblUserid, 10, SpringLayout.WEST, panel_2);
		panel_2.add(lblUserid);
		
		hftsecuid = new JTextField();
		sl_panel_2.putConstraint(SpringLayout.NORTH, hftsecuid, -2, SpringLayout.NORTH, lblUserid);
		sl_panel_2.putConstraint(SpringLayout.WEST, hftsecuid, 50, SpringLayout.EAST, lblUserid);
		sl_panel_2.putConstraint(SpringLayout.EAST, hftsecuid, -20, SpringLayout.EAST, panel_2);
		panel_2.add(hftsecuid);
		hftsecuid.setColumns(10);
		try{
			if (hftmain.d.getuid() != null){
				hftsecuid.setText(hftmain.d.getuid());
			}
		}catch (NullPointerException n){
			hftsecuid.setText(null);
		}
		JLabel lblPassword = new JLabel("Password:");
		lblPassword.setFont(new Font("Verdana", Font.PLAIN, 11));
		sl_panel_2.putConstraint(SpringLayout.NORTH, lblPassword, 18, SpringLayout.SOUTH, lblUserid);
		sl_panel_2.putConstraint(SpringLayout.WEST, lblPassword, 0, SpringLayout.WEST, lblUserid);
		panel_2.add(lblPassword);
		
		hftsecpswd = new JPasswordField();
		sl_panel_2.putConstraint(SpringLayout.NORTH, hftsecpswd, -2, SpringLayout.NORTH, lblPassword);
		sl_panel_2.putConstraint(SpringLayout.WEST, hftsecpswd, 0, SpringLayout.WEST, hftsecuid);
		sl_panel_2.putConstraint(SpringLayout.EAST, hftsecpswd, 0, SpringLayout.EAST, hftsecuid);
		panel_2.add(hftsecpswd);
		try{
			if (hftmain.d.getpswd() != null){
				hftsecpswd.setText(hftmain.d.getpswd());
			}
		}catch (NullPointerException n){
			hftsecpswd.setText(null);
		}
		hftsecsaveuid = new JCheckBox("Save userid");
		hftsecsaveuid.setSelected(true);
		hftsecsaveuid.setFont(new Font("Verdana", Font.PLAIN, 11));
		sl_panel_2.putConstraint(SpringLayout.NORTH, hftsecsaveuid, 14, SpringLayout.SOUTH, hftsecpswd);
		sl_panel_2.putConstraint(SpringLayout.WEST, hftsecsaveuid, 10, SpringLayout.WEST, panel_2);
		panel_2.add(hftsecsaveuid);
		
		hftsavepwd = new JCheckBox("Save Password");
		hftsavepwd.setSelected(true);
		sl_panel_2.putConstraint(SpringLayout.NORTH, hftsavepwd, 16, SpringLayout.SOUTH, hftsecsaveuid);
		sl_panel_2.putConstraint(SpringLayout.WEST, hftsavepwd, 10, SpringLayout.WEST, panel_2);
		hftsavepwd.setFont(new Font("Verdana", Font.PLAIN, 11));
		panel_2.add(hftsavepwd);
		
		JPanel panel_3 = new JPanel();
		panel_3.setBorder(new TitledBorder(null, "PKI Key:", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		springLayout.putConstraint(SpringLayout.WEST, panel_3, 48, SpringLayout.EAST, panel_2);
		springLayout.putConstraint(SpringLayout.EAST, panel_3, -10, SpringLayout.EAST, getContentPane());
		springLayout.putConstraint(SpringLayout.NORTH, panel_2, 0, SpringLayout.NORTH, panel_3);
		springLayout.putConstraint(SpringLayout.NORTH, panel_3, 70, SpringLayout.SOUTH, panel_1);
		springLayout.putConstraint(SpringLayout.SOUTH, panel_3, 228, SpringLayout.SOUTH, panel_1);
		getContentPane().add(panel_3);
		SpringLayout sl_panel_3 = new SpringLayout();
		panel_3.setLayout(sl_panel_3);
		
		JRadioButton hftrsa2 = new JRadioButton("RSA2");
		hftrsa2.setSelected(true);
		buttonGroup_1.add(hftrsa2);
		sl_panel_3.putConstraint(SpringLayout.NORTH, hftrsa2, 2, SpringLayout.NORTH, panel_3);
		sl_panel_3.putConstraint(SpringLayout.WEST, hftrsa2, 10, SpringLayout.WEST, panel_3);
		hftrsa2.setFont(new Font("Verdana", Font.PLAIN, 11));
		panel_3.add(hftrsa2);
		
		JRadioButton hftrsa = new JRadioButton("RSA1");
		sl_panel_3.putConstraint(SpringLayout.WEST, hftrsa, 0, SpringLayout.WEST, hftrsa2);
		buttonGroup_1.add(hftrsa);
		hftrsa.setFont(new Font("Verdana", Font.PLAIN, 11));
		panel_3.add(hftrsa);
		
		JRadioButton hftdsa = new JRadioButton("DSA");
		sl_panel_3.putConstraint(SpringLayout.SOUTH, hftrsa, -6, SpringLayout.NORTH, hftdsa);
		buttonGroup_1.add(hftdsa);
		sl_panel_3.putConstraint(SpringLayout.WEST, hftdsa, 10, SpringLayout.WEST, panel_3);
		sl_panel_3.putConstraint(SpringLayout.SOUTH, hftdsa, -47, SpringLayout.SOUTH, panel_3);
		hftdsa.setFont(new Font("Verdana", Font.PLAIN, 11));
		panel_3.add(hftdsa);
		
		JLabel lblUseKey = new JLabel("Use Key:");
		sl_panel_3.putConstraint(SpringLayout.NORTH, lblUseKey, 14, SpringLayout.SOUTH, hftdsa);
		sl_panel_3.putConstraint(SpringLayout.WEST, lblUseKey, 10, SpringLayout.WEST, panel_3);
		sl_panel_3.putConstraint(SpringLayout.EAST, lblUseKey, -176, SpringLayout.EAST, panel_3);
		lblUseKey.setFont(new Font("Verdana", Font.PLAIN, 11));
		panel_3.add(lblUseKey);
		
		JComboBox hftseckey = new JComboBox();
		sl_panel_3.putConstraint(SpringLayout.NORTH, hftseckey, -2, SpringLayout.NORTH, lblUseKey);
		sl_panel_3.putConstraint(SpringLayout.WEST, hftseckey, 6, SpringLayout.EAST, lblUseKey);
		sl_panel_3.putConstraint(SpringLayout.SOUTH, hftseckey, -15, SpringLayout.SOUTH, panel_3);
		sl_panel_3.putConstraint(SpringLayout.EAST, hftseckey, 166, SpringLayout.EAST, lblUseKey);
		panel_3.add(hftseckey);
		
		JButton hftsrhkeybtn = new JButton("Search for key");
		hftsrhkeybtn.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				JFileChooser  fc = null;
				File nrf = null;
				fc = new JFileChooser();
				fc.setFileHidingEnabled(false);
				fc.setDialogTitle("Locate Key");
				int returnVal = fc.showOpenDialog(getLayeredPane());
				if (returnVal == JFileChooser.APPROVE_OPTION) {
					nrf = fc.getSelectedFile();
					hftmain.d.setcrf(nrf);
					System.out.println("Selected key is:"+fc.getSelectedFile().getName());
				}
			}
		});
		sl_panel_3.putConstraint(SpringLayout.WEST, hftsrhkeybtn, 0, SpringLayout.WEST, hftseckey);
		sl_panel_3.putConstraint(SpringLayout.SOUTH, hftsrhkeybtn, -12, SpringLayout.NORTH, hftseckey);
		sl_panel_3.putConstraint(SpringLayout.EAST, hftsrhkeybtn, -10, SpringLayout.EAST, panel_3);
		panel_3.add(hftsrhkeybtn);
		tsys = hftmain.d.gettargst();
		MutableComboBoxModel tcbm = new DefaultComboBoxModel(tsys);
		
		JButton hftsecok = new JButton("");
		springLayout.putConstraint(SpringLayout.SOUTH, panel_2, -102, SpringLayout.NORTH, hftsecok);
		springLayout.putConstraint(SpringLayout.WEST, hftsecok, 0, SpringLayout.WEST, panel);
		hftsecok.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				jcti = 0;
				if (getJHFSsecsaveuid().isSelected() == true) {
					hftmain.d.setuid(hftsecuid.getText());
					//d.setuid(getJHFSsecuid().getText());
				}
				if (getJHFSsavepwd().isSelected() == true) {
					hftmain.d.setpswd(hftsecpswd.getText());
				}
				else {hftmain.d.setpswd("     ");}
				hftmain.d.settarg((String) hftsectargbox.getEditor().getItem());
				if (ep == false){ // enter was not pressed in target system combo box so process it here.				
            	tlbname = (String) hftsectargbox.getEditor().getItem();
				if (tsys[jcti] != null){ // There are name in array so loop through and make sure not a dup.
				int as = tsys.length;
				for (; jcti<50; jcti++){
				try{	
				if (tsys[jcti].isEmpty()){break;}
				}catch(NullPointerException n){
					break;
				}// end catch
				String str = tsys[jcti].toString();
				if (tsys[jcti].toString().equals(tlbname)){sf = true; break;}	
				}// end for loop
				if (sf == false){tsys[jcti] = tlbname;sf = true; jcti++;}

            }// end if tsys[jsti] != null
				if (tsys[jcti] == null & sf == false){sf = true;tsys[jcti]=tlbname;jcti++;} // If no names in array, just add one.
			} // end if ep = false
			hftmain.d.settarg((String)hftsectargbox.getEditor().getItem());
			String dave = (String) hftsectargbox.getEditor().getItem();
			if (hftftpbtn.isSelected()){hftmain.d.settrantype("ftp");}
			if (hftsftpbtn.isSelected()){hftmain.d.settrantype("sftp");}
			hftmain.Dlgdatachanged=true;
 			dispose();
			}
		});
		hftsecok.setIcon(new ImageIcon(hftsecdlg.class.getResource("images/dlgok.png")));
		getContentPane().add(hftsecok);
		
		JButton hftseccan = new JButton("");
		springLayout.putConstraint(SpringLayout.SOUTH, hftsecok, 0, SpringLayout.SOUTH, hftseccan);
		springLayout.putConstraint(SpringLayout.EAST, hftsecok, -480, SpringLayout.WEST, hftseccan);
		hftseccan.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				dispose();
			}
		});
		springLayout.putConstraint(SpringLayout.WEST, hftseccan, -56, SpringLayout.EAST, getContentPane());
		springLayout.putConstraint(SpringLayout.SOUTH, hftseccan, -11, SpringLayout.SOUTH, getContentPane());
		springLayout.putConstraint(SpringLayout.EAST, hftseccan, -10, SpringLayout.EAST, getContentPane());
		hftseccan.setIcon(new ImageIcon(hftsecdlg.class.getResource("images/dlgcan.png")));
		getContentPane().add(hftseccan);
		
		JPanel panel_4 = new JPanel();
		springLayout.putConstraint(SpringLayout.NORTH, panel_4, 6, SpringLayout.SOUTH, panel);
		springLayout.putConstraint(SpringLayout.WEST, panel_4, 10, SpringLayout.WEST, getContentPane());
		springLayout.putConstraint(SpringLayout.SOUTH, panel_4, -6, SpringLayout.NORTH, panel_2);
		springLayout.putConstraint(SpringLayout.EAST, panel_4, 0, SpringLayout.EAST, panel_1);
		panel_4.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Transfer using", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		getContentPane().add(panel_4);
		panel_4.setLayout(null);
		
		hftftpbtn = new JRadioButton("FTP");
		hftftpbtn.setSelected(true);
		buttonGroup_2.add(hftftpbtn);
		hftftpbtn.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				hftmain.d.settrantype("ftp");
			}
		});
		hftftpbtn.setBounds(6, 28, 56, 23);
		panel_4.add(hftftpbtn);
		
		hftsftpbtn = new JRadioButton("SFTP");
		buttonGroup_2.add(hftsftpbtn);
		hftsftpbtn.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				hftmain.d.settrantype("sftp");
			}
		});
		hftsftpbtn.setBounds(64, 28, 56, 23);
		panel_4.add(hftsftpbtn);
		
		hftftpsbtn = new JRadioButton("FTPS");
		buttonGroup_2.add(hftftpsbtn);
		hftftpsbtn.setBounds(122, 28, 56, 23);
		panel_4.add(hftftpsbtn);
		
		hftscpbtn = new JRadioButton("SCP");
		buttonGroup_2.add(hftscpbtn);
		hftscpbtn.setBounds(180, 28, 60, 23);
		panel_4.add(hftscpbtn);
		
		hftshellbtn = new JRadioButton("Open a Command Shell");
		buttonGroup_2.add(hftshellbtn);
		hftshellbtn.setBounds(242, 28, 196, 23);
		panel_4.add(hftshellbtn);
		
		JPanel panel_5 = new JPanel();
		springLayout.putConstraint(SpringLayout.NORTH, panel_5, 6, SpringLayout.SOUTH, panel_2);
		springLayout.putConstraint(SpringLayout.WEST, panel_5, 10, SpringLayout.WEST, getContentPane());
		springLayout.putConstraint(SpringLayout.SOUTH, panel_5, 79, SpringLayout.SOUTH, panel_2);
		springLayout.putConstraint(SpringLayout.EAST, panel_5, 0, SpringLayout.EAST, panel_1);
		panel_5.setBorder(new TitledBorder(null, "Known Systems file", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		getContentPane().add(panel_5);
		panel_5.setLayout(null);
		
		hftksbox = new JComboBox();
		hftksbox.setBounds(10, 26, 331, 31);
		panel_5.add(hftksbox);
		try{
		File crap = hftmain.d.getksf();
		if (hftmain.d.getksf()!=null){
			hftksbox.setSelectedItem(hftmain.d.getksf().getPath());
		}
		}
		catch(NullPointerException e){
			
		}
		//hftksbox.setSelectedIndex(1);
		JButton hftksbtn = new JButton("Seach for Known Systems File");
		hftksbtn.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				JFileChooser  fc = null;
				File ksf = null;
				fc = new JFileChooser();
				fc.setFileHidingEnabled(false);
				fc.setDialogTitle("Locate Key");
				int returnVal = fc.showOpenDialog(getLayeredPane());
				if (returnVal == JFileChooser.APPROVE_OPTION) {
					ksf = fc.getSelectedFile();
					hftmain.d.setksf(ksf);
					System.out.println("Selected Known Systems File is:"+fc.getSelectedFile().getPath());
					hftksbox.addItem(ksf.getPath());
				}
				
			}
		});
		hftksbtn.setBounds(351, 26, 211, 31);
		panel_5.add(hftksbtn);
		



	}

	public JComboBox getJHFSsectargbox() {
		return hftsectargbox;
	}
	
	public JCheckBox getJHFSsecsaveuid() {
		return hftsecsaveuid;
	}
	public JCheckBox getJHFSsavepwd() {
		return hftsavepwd;
	}
	public JPasswordField getJHFSsecpswd() {
		return hftsecpswd;
	}

	public JTextField getJHFSsecuid() {
		return hftsecuid;
	}
	public static JComboBox getHftksbox() {
		return hftksbox;
	}
	public static JRadioButton getHftftpbtn() {
		return hftftpbtn;
	}
	public static JRadioButton getHftsftpbtn() {
		return hftsftpbtn;
	}
	public JRadioButton getHftftpsbtn() {
		return hftftpsbtn;
	}
	public JRadioButton getHftscpbtn() {
		return hftscpbtn;
	}
	public JRadioButton getHftshellbtn() {
		return hftshellbtn;
	}
}


